home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
shell-tools
/
zshell29
/
old
/
zshell.doc
< prev
next >
Wrap
Text File
|
1995-06-02
|
32KB
|
1,009 lines
ZSHELL V1.30 (C) 1990,91 PAUL HAYTER
======================================
OVERVIEW
========
ZShell is a small CLI shell. I needed a shell which had my
favourite features of CSH yet was a lot smaller, so it would load
faster and use much less memory.
FEATURES
========
* about 13K.
* Supports the standard housekeeping commands
dir , cd , rename , mkdir , delete , copy , path , info ,
type.
* Function key aliasing.
* Command aliasing.
* Reverse Polish Calculator.
* Script file execution.
* 1024 byte command line history.
* Command line editing.
* Can examine the KickTagPtr,CoolCapture etc.
* Has a cold reset command.
* Wild Card file descriptions.
* Special programmers status mode.
* Simple 'More' type text viewer.
* Has a resident command.
* IF ... ELSE ... ENDIF constructs.
SPECIAL CHARACTERS
==================
The following characters have special meanings to ZShell.
" " Double quotes. Used to enclose strings with spaces.
eg "hello world".
^n Hat character. Prefixes a control character letter (n).
Used in ASK, ECHO, & SET commands. eg ^L <-clear screen
%n Percent prefixes a number (0-7) to specify an optional
parameter for command aliases. Used in SET command.
Can also be used to specify prompt arguments. See PROMPT
command.
$n Dollar prefixes a number (0-7) and corresponds to an
optional parameter specified with %n (above).
*?~[] Wildcard characters. * matches 0 to n characters. ? matches
one character, ~ negates the following wild card, and [ ]
surround a class of characters to match. See WILD CARDS.
\n Backslash prefixes a special character, whose meaning you
want ignored. eg echo "hello \"fred\"" (hello "fred")
; Semi-colon seperates multiple commands on one line.
eg. cd df1:;dir
> redirect output.
< redirect input.
>> redirect append output.
ZSHELL INBUILT COMMANDS
=======================
Most commands can be aborted by depressing Control-C.
A textual error message will be displayed if an AmigaDOS error
occurs.
------------------------------------------------------------------------
ADDBUFFERS drive number_of_buffers
* ADDBUFFERS increases disk access speed on the specified drive by
adding a number of sector cache buffers. Each additional buffer
reduces memory by about 500 bytes. Generally, 25-30 buffers is
optimal.
eg. addbuffers df0: 25
addbuffers df1: 10
------------------------------------------------------------------------
ASK [question]
* ASK prompts the user with a question requiring a Yes or No
answer. If the first letter of the users response is 'Y', ASK
returns code WARN. Any other letter will result in return code OK.
The question can include ASCII characters as well as control
codes as per the ECHO command.
eg. ask "Do you want commands copied to ram? "
if warn
copy c: ram:
endif
------------------------------------------------------------------------
ASSIGN [logical name:] [directory]
* ASSIGN will assign a logical device name to a disk directory.
eg. assign z: df1:zshell_source
Now if you do a DIR Z: you will get a directory of df1:zshell_source.
Similarly, the default device names can be reassigned.
eg. assign libs: df1:libs
* Typing ASSIGN with no parameters, will list the current device
assignments.
eg. assign
* NOTE: the logical name you give to the command MUST end in a
colon (:)
Assign is compatible with the amigados assign command.
------------------------------------------------------------------------
CD [destination]
* Changes the current directory to 'destination'. If no parameter
is given, the current directory's name is shown.
eg. cd ram:
------------------------------------------------------------------------
COPY [-r] source1 [sourcefile2] [sourcefile3]... destination
* There are 6 derivatives of the copy command.
1. copy file to file.
eg. COPY C:LIST RAM:LS
2. copy file to a directory.
eg. COPY C:MOUNT DF1:C
3. copy multiple files to a directory.
eg. COPY L:PORT-HANDLER L:DISK-VALIDATOR DF1:L
5. copy files in a directory to another directory.
eg. COPY C: DF2:C
4. copy multiple directories to a single directory.
eg. COPY L: DEVS: C: RAM:
6. Recursively copy all files and subdirectories within the source
directory to the destination directory.
eg. COPY -R DF0: DF1:
Other examples:
eg. copy fred wilma
eg. copy c:dir df1:c
eg. copy dir list type cd df1:c
eg. copy df0:devs df1:devs
eg. copy *.s ram:
copy df0: df1: {only copy the files in df0: to df1:}
------------------------------------------------------------------------
DELETE [-r] source1 [source2] [source3] [source4]... [source11]
* Deletes up to 11 files or directorys ('source1'...'source11').
* If you specify the -r option when deleting a directory, then all
subdirectories are recursively deleted also. Otherwise (if the -r
option is not given) only the files in the specified directory are
deleted.
eg. delete fred wilma barney betty dino
delete df0:devs df1:c df1:data ram:
delete menu
delete -r devs:
delete -r df1:
------------------------------------------------------------------------
DIR [source]
* Lists the directory of the 'source' to the screen. Hitting space
will pause the listing and backspace will continue it. Files are
shown with their size in bytes. DIR lists the current directory
if no parameter is given. If 'source' is a filename, then only
that file is listed.
eg. dir df0:
------------------------------------------------------------------------
DIW [source]
* This is identical to the above DIR command ,except that the
directory is printed in two vertical columns. DIW is a pseudonym
for Directory Wide.
eg. diw devs:
------------------------------------------------------------------------
ECHO [string]
* Prints the 'string' to the screen. If you want spaces in the
string, make sure the whole string is enclosed in quotes. If you
want to print special control characters (eg. ctrl-L clear screen)
then prefix the control letter with a ^ character. If you want to
print double quotes, then use the \ character before the qoutes.
eg. echo hello
echo "hello world"
echo "^Lthe screen was just cleared"
echo "^Lline 1^Jline 2^Jline 3"
echo "these are double quotes ->\""
* Some common control codes are:
^J linefeed.
^L clear screen.
^M carriage return.
^X clear line.
^[ escape.
------------------------------------------------------------------------
ELSE
* ELSE marks the middle of an IF statement. All statements
following it, and before the ENDIF statement will be executed
only if the IF condition is FALSE. See IF for usage.
------------------------------------------------------------------------
ENDIF
* ENDIF marks the end of an IF statement. See IF for usage.
------------------------------------------------------------------------
EXEC source
* Executes the ZShell script file of name 'source'. All ZShell
commands, as well as commands from disk are valid within a
script file.
eg. exec install_hard_disk
------------------------------------------------------------------------
EXIT
* Exits you from the shell back to the AmigaDOS CLI prompt.
eg. exit
------------------------------------------------------------------------
FAILAT [failat level]
* FAILAT sets the error code level at which scripts (and multiple
commands on one line) will be aborted. The default level is 10.
Most commands return 10 as a serious error, while compilers
returning Warning type errors will return 5. Hence, the default
of 10 will allow Warnings to occur without the script (or line)
being aborted.
eg. failat 20 {sets failat level to 20}
* If you do not specify a failat level, the current setting is
shown.
eg. failat
------------------------------------------------------------------------
GOTO label
* GOTO searches for the label within the current script file. If it
finds it, execution continues from that point onwards. Labels
are specified using the LABEL command.
eg. label myloop
diw ram:
ask "list ram again? "
if warn
goto myloop
endif
------------------------------------------------------------------------
HELP
* Lists to the screen the names of all available ZShell commands.
HELP can also be invoked by hitting the HELP key.
eg. help
------------------------------------------------------------------------
HTYPE source
* HTYPE outputs a hex listing of the file specified. Output is the
same as the M command. <SPACE> pauses the listing, <BACKSPACE>
gets it going again, and <CTRL C> will abort the listing.
eg. htype c:list
------------------------------------------------------------------------
IF [NOT][WARN][ERROR][FAIL][EXISTS file]
* The IF command allows conditional execution of statements
following it.
* If the condition specified is true, then execution continues
after the IF statement until either an ENDIF or ELSE statement
is encountered. If it is an ELSE statement, then all statements
between the ELSE and the closing ENDIF are skipped.
* If the condition is false, then all statements after the IF and
before either an ENDIF or ELSE statement are skipped. If an ELSE
is encountered, then execution continues for all statements after
the ELSE and before the closing ENDIF.
* IF can examine the state of the return code from the last command
execute with WARN, ERROR, and FAIL tests. You can test for the
non existence of such a state by including the optional NOT
parameter.
eg. IF WARN
echo "last command returned warnings"
ELSE
echo "last command did not return warnings"
ENDIF
IF not fail
echo "last command did not fail"
ENDIF
* IF can also test for the existence of a file or directory.
eg. IF EXISTS system/format
echo "this disk has a format command"
echo "you can look yourself. I'm not joking"
ENDIF
IF not exists ram:ed
copy c:ed ram:
ENDIF
------------------------------------------------------------------------
INFO [disk]
* Shows the number of bytes free on the disk specified ,or the
current disk if you don't specify one.
eg. info df0:
------------------------------------------------------------------------
JOIN [sourcefile1] [sourcefile2] ... [sourcefile11] destfile
* JOIN concatenates up to 11 files to form a new file (destfile).
eg. join fred.doc roy.doc dog.doc mydocs.doc
------------------------------------------------------------------------
LABEL label
* LABEL specifies a destination for the GOTO command. See GOTO.
------------------------------------------------------------------------
M [start_address] [end_address]
* M is a memory contents dumping command.
* Typing M with a start and end address will display the hex and
ASCII contents of those bytes in the memory locations specified.
* Typing M with only a start address will display 320 bytes
starting at the location specified.
* Typing M with no parameters will display 320 bytes starting
from the current memory location.
* The current memory location is always one location higher than
the last location shown by a prior M command.
eg. m $70000 $77fff
m $fc0000
m 0
m
------------------------------------------------------------------------
MEM
* Shows the available memory as ,1.Total chip memory free,
2.Total fast memory free,
and 3.Total memory free.
eg. mem
------------------------------------------------------------------------
MKDIR [directory1] [directory2] ... [directory11]
* Creates one or more directorys of the names specified.
eg. mkdir shells
mkdir c l s libs devs fonts
mkdir devs/printers ram:c
------------------------------------------------------------------------
MORE source [line count]
* MORE acts as a simple text file viewer. By default, it will show
23 lines of a text file, then wait for some user input.
Commands within MORE are:-
<SPACE> - advance you 20 lines forward.
<BACKSPACE> - display text from 20 lines back.
<RETURN> - advance 1 line.
<B> - goto end(Bottom) of text file.
<T> - goto top of text file.
Typing anything else will abort you back to the shell.
eg. more readme
* Specifying the optional line count will allow you to show more
than the default 23 lines. {Very useful for large borderless PAL
screens}
eg. more contents 30
more readme 25
------------------------------------------------------------------------
PATH [-a] [path1] [path2] [path3] [path4] ... [path11]
* PATH defines the search path used by ZShell when searching
for disk based commands.
* By omitting the -a option, you can specify ZShell's entire command
search path. It will be defined as resident_commands,
current_directory, then path1, then path2, then path3, then path4,
upto path 11
eg. path c: ram:c df0: df1:
This example will make it so that if you type a command which is
not internal to Zshell, the resident list will be searched for it,
then the current directory, then the c: directory, then the ram:c
directory, then df0:, and finally df1:
eg. path ram: df0: df0:c df1: df1:c c:
Zshell will try to find the command you type in the resident list,
then current directory, then ram:, then df0:, then df0:c, then
df1:, then df1:c, then c:
* By including the -a option, you can add a number of paths onto the
existing command search path.
eg. path -a df2:c
Adds the directory df2:c onto the existing command search path.
eg. path -a df1:bin df1:myprogs
Adds the two directories df1:bin and df1:myprogs onto the existing
command search path.
* If, however, you type path with no parameters, the current search
path (excluding resident list and current) will be displayed.
------------------------------------------------------------------------
PROMPT [string]
* If no parameter is typed ,then the current prompt setting is
shown.
eg. prompt
* If a prompt string is specified, then the current prompt setting
is changed to that string. The character '%' specifies a special
prompt option.
%p Insert current directory name.
%n Insert CLI number.
eg. prompt "%p> " {default prompt. Show current directory + '>'}
prompt "Hello ." {shows 'Hello .' at the start of every line}
prompt "%n.%p> " {show CLI number, then current dir, then '>'}
------------------------------------------------------------------------
RELABEL drive newname
* RELABEL renames the disk specified with the newname given.
eg. relabel Empty: MY_DISK
relabel df0: FISHMONGER
------------------------------------------------------------------------
RENAME source destination
* Renames the file or directory of name 'source' to that of
'destination'. You can use this to move files on a disk.
eg. rename df0:c/list df0:ls (moves and renames)
rename avail mem
------------------------------------------------------------------------
RESET
* Performs a COLD reset of your Amiga. i.e. RAD will go, and you
will get back fast memory that may have been disabled. And viruses
should disappear.
eg. reset
------------------------------------------------------------------------
RESIDENT [command1] [command2] ... [command11]
* RESIDENT allows you load commands into memory, such that they
will execute immediately, rather than be loaded from disk all the
time. The benefit of RESIDENT over saving commands on the RAM:
disk is that only one copy of the command is in memory all the
time. RAM: based commands will use up twice as much memory when
the command is being executed.
* The limitation of RESIDENT is that only certain commands will
work. Generally, all commands which have their PURE bit (see
SETPROT command) set can be made RESIDENTABLE. However, RESIDENT
does not check whether the PURE bit is set before loading, and
hence you can try out commands to see if they work. They'll
always work the first time. Its only when executing the 2nd
time that the Amiga will likely crash.
NB: Crunched programs will most likely not work.
* Typing RESIDENT with no parameters will show the current list
of resident commands.
* Typing up to 11 command names after RESIDENT will make those
commands resident. ZShell will search the command search path
to try and find them.
eg. resident c/list c/cd c/date c/avail
resident ed
------------------------------------------------------------------------
RETURN [error_code]
* RETURN forces a script file to end, and return to the shell.
An optional error code can be passed back (ie. 5=WARN 10=ERROR
etc).
eg. return 5
return
------------------------------------------------------------------------
RPN expression
* RPN evaluates the 'expression' as a reverse polish expression,
and displays the answer in decimal and hex notation. Reverse
Polish Notation is used in Forth and in Hewlett Packard
calculators(the best calculators in the world). It is based on
how arithmetic is actually done at the lowest possible level.
eg. rpn 4 5 +
This gives the answer 9. When a number is typed, it is 'pushed'
onto the arithmetic stack. The + always adds the last two numbers
on the stack.
eg. rpn 7 2 3 + -
This gives the answer 2. It is the same as {7 - (2 + 3)}. See,
7 is first pushed onto the stack, followed by 2, then 3. The +
adds together the 2 and 3 and leaves the result 5 on the stack.
Which means that the number 7 followed by 5 are left on the
stack. The - subtracts the last entry (5) on the stack from the
one before it (7), leaving the result 2
eg.
12 * (3 + 9) > rpn 12 3 9 + *
(15 - 4) * (6 + 18) > rpn 15 4 - 6 18 + *
(6 * ((87 + 13) / (2 * 25))) > rpn 6 87 13 + 2 25 * / *
* RPN only performs 32 bit integer arithmetic.
* The operators + - * / & | @ ! are supported.
The & allows logical AND'ing. And | allows logical OR'ing.
The @ is similar to PEEK in BASIC.
eg. rpn $c00000 @
This prints out the long word in memory locations $c00000 -
$c00003.
Conversely, ! is similar to POKE in BASIC
eg. rpn $aa55aa55aa $40000 !
This pokes the long word $aa55aa55aa into locations $40000
thru $40003.
* RPN also supports hexadecimal and binary numbers.
If you prefix the number with $, the number is hex
If you prefix the number with %, it is binary.
eg. rpn $c00000 $a0 16 * +
rpn $aa $f0 &
rpn $80 $20 $08 $01 | | |
rpn $67 %11001011 &
* RPN can also be used to perform base conversions (to dec or hex)
eg. rpn $ca
rpn %10110001
rpn 45
------------------------------------------------------------------------
SET [variable] [definition]
* SET assigns a variable name to a definition. The variable name
can be up to 15 characters long, and the definition can be up to
about 360 characters long.
Function Keys
-------------
eg. set f1 "ed df0:s/startup-sequence^M"
This example assigns the unshifted F1 key to the text enclosed in
quotes. Note that the ^M characters puts an auto carriage return
in the definition.
eg. set F10 "cd df0:^M"
This sets shifted F10 to 'cd df0:<CR>'.
Other egs set f2 "cd df1:^M"
set f4 "genim2 "
set F9 "scribble df0:text/"
set f1 "a68k z.a;blink z.o to z^M"
Command Aliases
---------------
* The secondary use of set is to assign command aliases.
eg. set mv rename
This allows an alternate name for rename. i.e. mv.
So you could type
mv oldname newname {to rename oldname to newname}
Or
eg. set as a68k
set pp powerpacker
set du dirutil
set go "a68k zsh.s;blink zsh.o to zsh"
set cped "copy df0:c/ed"
You would use this last alias, if you need to copy a particular
file a lot. So, to copy c/ed to ram: use:-
cped ram:
* You can also pass external parameters to an alias.
eg. set al "%1 a68k $1.s;blink $1.o to $1"
Typing
al test
will assemble test.s using a68k, then blink test.o to become test.
You can specify upto eight parameters to pass to a command alias.
At the start of the set definition, specify the parameters to pass
with the variables %0 thru %7. These need not be in sequence. The
first %n will be assigned to the first parameter, the 2nd %n to
the 2nd parameter etc.
Insert the corresponding variables $0 thru $7 at the points in the
set definition where that parameter is to appear.
eg. set disp "%1 %2 %3 echo \"$3 $2 $1\""
set cram "%0 %1 %2 %3 copy $0 $1 $2 $3 ram:"
set go "%5 %1 %6 %2 echo \"1st-$5 2nd-$1 3rd-$6 4th-$2\""
* Command aliases can be nested to 1 level.
eg. set cls "echo ^L";set cdir "%1 cls;cd $1;diw"
* An important point about aliases, is that you can redefine the
existing internal command names.
eg. set help "type help_screen"
This would make it so that pressing HELP or typing H E L P would
not generate the standard help command list, but would type the
file called help_screen to the screen. Similarly
eg. set copy c:copy
set info c:dfree
set mem c:avail
* Typing set with no parameters at all, will generate a list of all
current definitions.
eg. set
------------------------------------------------------------------------
SETPROT [filename] [h|s|p|a|r|w|e|d]
* Allows you to alter/see the protection bits associated with a file.
* SETPROT filename
Shows the protection bits for the file specified.
eg. setprot editor
* SETPROT filename [h|s|p|a|r|w|e|d]
Toggles the specified protection bits on the file.
eg. setprot editor pd
If 'editor' was already pure, then the pure bit would be reset.
If 'editor' was not pure, then the pure bit would be set.
If 'editor' was deletable, then the delete bit would be reset.
If 'editor' was not deletable, then the delete bit would be set.
eg. setprot game hprwd
eg. setprot monitor hsparwed
Bits: 'h' hidden V1.3
's' script V1.3
'p' pure V1.3
'a' archive V1.3
'r' readable
'w' writable
'e' executable
'd' deletable <- V1.2 only understands this bit
------------------------------------------------------------------------
SLEEP timeout
* SLEEP halts processing for the time given. Timeout is in seconds.
eg. echo "I'll wait a minute"
sleep 60
------------------------------------------------------------------------
STACK [size]
* Allows you to view or alter the current stack size.
eg. stack [shows the current stack size]
stack 30000 [sets current stack = 30000 bytes]
stack 10000 [sets current stack = 10000 bytes]
------------------------------------------------------------------------
STATUS [-y|-n]
* Activates or deactivates the programmers status line.
eg. status -y [activates status line]
status -n [deactivates status line]
The status line (if activated) will only appear once a disk based
or resident program has been executed. The line appears as follows:
RETURN: 0 time = 00:00:23.66 changes-> chip: 0 fast: 0 total: 0
Return shows the return code that the program returned in D0 (usually
= 0). Time shows how long the program took to execute in hours,
minutes, seconds, hundredths (This time does NOT include the time
it takes to load the program from disk). Changes show if the program
has left any memory still allocated. i.e. if 200 bytes of chip
memory were left allocated by the program, then 'chip: -200'
------------------------------------------------------------------------
STRINGS sourcefile [count]
* STRINGS displays all valid ASCII strings in a file which have a
length greater than or equal to the count. If no count is given,
a default of 10 characters is used.
* This command is very useful for finding out which libraries a
program uses.
eg. strings c:zshell 12
------------------------------------------------------------------------
TIME
* Displays the current time in hours:minutes:seconds.hundredths
------------------------------------------------------------------------
TYPE source
* Prints to the screen the ASCII text file specified as 'source'.
Hitting any key will pause the listing. Backspace will restart it.
CTRL <C> will abort the listing.
eg. type readme
------------------------------------------------------------------------
UNSET [set1] [set2] [set3] [set4] ... [set11]
* Removes one or more set definitions from the set list.
eg. set f1 "cd df0:;diw^M"
set f2 "cd df1:;diw^M"
...
set f10 "ed df1:s/startup-sequence^M"
...
unset f1 f2 f3 f4 f5 f6 f7 f8 f9
...
unset f10
------------------------------------------------------------------------
VEC
* Displays some important execbase pointers, which give a good
indication of whether a virus is present in your system.
WarmCapture, CoolCapture, ColdCapture, KickTagPtr, KickMemPtr,
and KickCheckSum are displayed. If any of these are are NOT
zero, then either a virus, RAD, or virus protector or some
other program that takes control of your machine when you
reset, is present. If you suspect a virus, you may want to eject
the disk from DF0: and type the RESET command, which should
clear the virus. Now you should boot up on a clean disk.
eg. vec
------------------------------------------------------------------------
VERSION
* Tells you ZShell's version number.
eg. version
------------------------------------------------------------------------
; blah blah blah blah
* etc etc etc
# hello ma
* Placing a semi-colon, an asterisk or a hash character as the 1st
character in the line of a script file allows you to place comments
in it.
eg. ; This is a comment line
------------------------------------------------------------------------
HISTORY & COMMAND LINE EDITING
==============================
ZShell has a 1024 byte circular history buffer. It works similar
to most other shells and the NEWCON: handler in Workbench V1.3.
UP ARROW - go back one line in the history buffer.
DOWN ARROW - go forward one line in the history buffer.
SHIFT UP ARROW - go to the 1st line in the history buffer.
SHIFT DOWN ARROW- go to the last line in the history buffer, which
should be blank.
LEFT ARROW - move cursor left.
RIGHT ARROW - move cursor right.
SHIFT LEFT ARROW- move cursor one word left.
SHIFT RIGHT ARROW move cursor one word right.
CTRL X - deletes whole line.
CTRL E - move cursor to end of line.
CTRL Z - move cursor to start of line.
Again, command line editing is similar to most shells. Backspace
and delete do what they're supposed to do.
WILD CARDS
==========
As at V1.09, ZShell supports wild card file descriptions on some
commands (DIR, DIW, DELETE & COPY). Wild cards are like those
supported on MS-DOS systems, and not the same as the ones on
AMIGA DOS. NOTE: You can only effectively put one * character in a
wild card.
Character Meaning
--------- -------
* Match zero or more characters.
? Match one character.
~ Negates the following wildcard.
[ ] Specifies a class of characters to match.
eg. diw *.info {lists all .info files}
dir z*.s {lists all files starting z, ending in .s}
delete *.info {deletes all .info files}
copy *.s ram: {copies all .s files to ram:}
copy 1? df1: {copies all two char files beginning with 1}
dir ~*.s {lists all files NOT ending in .s}
dir ~*.info {lists all files except for .info files}
dir *.[co] {lists files ending in .c or .o}
dir [abcd]* {lists files beginning with a,b,c or d}
INPUT/OUTPUT REDIRECTION
========================
The standard redirection operators are supported for all internal
commands, as well as disk based programs. Redirection only affects
those programs which use the dos.library's Input() and Output()
functions.
> redirect std output.
< redirect std input.
>> append redirect output. (tacks output onto the end of file)
eg. diw df1:c >ram:directory
type zshell.doc <raw:0/0/100/100/input >raw:0/0/640/100/output
sortfile things >>df0:things.log
EXECUTING COMMANDS FROM DISK
============================
Just type the program's name, the same as you would at the
1> prompt. Note that you do NOT need the RUN command in the C:
directory.
HOW TO RUN IT BIT
=================
ZShell must be started from the CLI.
eg. 1> ZShell
When ZShell is loaded, it trys to load the DEFAULT SCRIPT FILE
called LOGIN.Z. First the S: directory is checked for it, followed
by the current directory. Once loaded, the script is executed.
You can automatically execute a ZShell script file when starting
up ZShell by including the script file's name on the CLI line.
eg. 1> ZShell script.z
You can call ZShell script files anything you like (they don't
have to end in .z)
EXAMPLE STARTUP SCRIPTS
=======================
eg. You want to set up one of those utilities disks where
everything operates by pressing function keys.
; UTILITY DISK STARTUP SCRIPT
set f1 Amigamon^M
set f2 PaulCopy^M
set f3 Fixdisk^M
set f4 FastDisk^M
set f5 trackdos^M
set f6 zerovirus^M
set f7 novirus^M
set f8 WayneCopy^M
set f9 powerpacker^M
set f10 dirwork^M
set F1 dirutil^M
set F2 diskspin^M
set F3 pprefs^M
set F4 "mount msh:^M"
set F5 sound_ripper1^M
set F6 sound_ripper2^M
set F7 VirusExpert^M
set F8 reset^M
set F9 "cd df0:;diw^M"
set F10 "ed df0:s/startup-sequence^M"
set help "type sys:menu"
help
; END OF SCRIPT
* Obviously you'd call this file something like zstart.z, and shove
it in your s: directory. Then put in your startup-sequence ;
ZShell s:zstart.z
And make sure the text file 'menu' has the proper menu of function
keys.(NB. You could also call it LOGIN.Z, and shove it in the S:
directory. And just put the following in the startup-sequence ;
ZShell
-----------------------------------------------------------------------
eg. You want to set up a CLI work disk.
; CLI DISK STARTUP SCRIPT
echo "**** MY CLI DISK ****"
copy c:ed ram:
set f1 "cd df0:^M"
set F1 "cd df1:^M"
set f2 diw^M
set F2 "diw c^M"
set f3 "cd df0:;diw^M"
set F3 "cd df1:;diw^M"
set f4 WayneCopy^M
set F4 PaulCopy^M
set f5 "ed "
set F5 "zap^M"
set f6 "type df1:contents^M"
set f10 "ed df0:s/startup-sequence^M"
set F10 "ed df1:s/startup-sequence^M"
set cl "%1 cd $1;diw"
set cls "echo ^L"
set mm "%1 more $1 30"
; NOW AS A STINGY MENU, SHOW THE CURRENT SETTINGS
set
FUTURE
======
* Needs to be extra stuff to make the script language flexible.
* Probably should have date stuff (I don't have a clock)
CREDITS
=======
Many thanks to Wayne for his invaluable help in doing the history
and command line editing parts of ZShell. Also, thanks to
Tim Strachan who asked for the history stuff.
ZShell was entirely written using Wayned by Wayne Hayter (various
versions). And was assembled with A68K V2.61 by Charlie Gibbs. And
linked with Blink V6.7 by the Software Distillery.
IN THIS DIRECTORY
=================
Included with this distribution of ZShell are the following files:
ZShell : the shell
ZShell.doc : This doc file
ZShell.s.lzh : The lharc'ed assembly source code for ZShell
DISTRIBUTION
============
ZSHELL IS FREELY DISTRIBUTABLE. YOU CAN DISTRIBUTE THIS AS LONG AS
THIS DOC FILE REMAINS WITH THE EXECUTABLE, AND THAT NO CHARGE IS MADE FOR
THEM (APART FROM A NOMINAL COPYING CHARGE). IF YOU FEEL LIKE SENDING
ME SOMETHING FOR THIS PROGRAM, SEND ME A POSTCARD!, A P.D. DISK, A
PROGRAM YOU'VE BEEN WORKING ON ,BUT DON'T SEND ME ANY MONEY (WELL, IF
YOU REALLY, REALLY WANT TO, I GUESS I COULD PUT UP WITH IT).
CORRESPONDENCE & BUG REPORTS
============================
Please send any correspondence and/or bug reports to me at the
address below:-
Paul Hayter
PO Box 331
Ballina
2478
Australia.